package com.simon.mctm.base.response;


import com.simon.mctm.utils.SystemCode;
import io.swagger.annotations.ApiModelProperty;

/**
 * 正常处理和获取数据返回消息
 * @author Jiajie.Mao
 * @date 2018/6/7 15:29
 */
public class DoResponse<T> extends ExResponse {

	@ApiModelProperty(value = "返回的数据")
	private T data;

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}

	public DoResponse(){
		super(SystemCode.SYSTEM_SUCESS_CODE, SystemCode.SYSTEM_SUCESS_TEXT);
	}

	public DoResponse(Integer code, String msg, T data) {
		super(code, msg);
		this.data = data;
	}

	public DoResponse(String msg) {
		super(SystemCode.SYSTEM_SUCESS_CODE, msg);
	}

	public DoResponse(T data) {
		super(SystemCode.SYSTEM_SUCESS_CODE, SystemCode.SYSTEM_SUCESS_TEXT);
		this.data = data;
	}

}
